package com.guigu.service.impl;

import com.guigu.dto.MotionDTO;
import com.guigu.entity.MemberBean;
import com.guigu.mapper.InterventionMapper;
import com.guigu.service.InterventionServce;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class InterventionServceImpl implements InterventionServce {
    private InterventionMapper interventionMapper;
    @Override
    public List<MemberBean> queryMember(String name) {
        return this.interventionMapper.queryMember(name);
    }

    @Override
    public int addmotiononmotion_summaryAndaddinterventionAndaddMotionAndaddMeals(MotionDTO motionDTO) {
        int res = this.interventionMapper.addmotiononmotion_summary(motionDTO);
        res *= this.interventionMapper.addintervention(motionDTO.getInerventions());
        return res;
    }
}
